package com.yxy.controller.mobile;

import com.yxy.common.Result;
import com.yxy.constant.RequestMapperConstant;
import com.yxy.domain.vo.ResourcesVO;
import com.yxy.service.ResourcesService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("userResourceController")
@RequestMapping(RequestMapperConstant.USER_REQUEST_MAPPER + "resources")
@Slf4j
public class ResourceController {

    @Autowired
    private ResourcesService resourcesService;

    /**
     * 获取资源列表
     * @return
     */
    @GetMapping
    public Result<ResourcesVO> list(){
        log.info("获取资源列表");
        ResourcesVO vo = resourcesService.list();
        return Result.success("", vo);
    }
}
